Extend PencilBannerSnippet placement to HomePage, ArticleThemePage, and ArticleDetailPage.#1506
Open
slightlyoffbeat wants to merge 2 commits into
Open
Extend PencilBannerSnippet placement to HomePage, ArticleThemePage, and ArticleDetailPage.#1506slightlyoffbeat wants to merge 2 commits into
slightlyoffbeat wants to merge 2 commits into
Conversation
Adds Placement models + InlinePanels for HomePage, ArticleThemePage, and ArticleDetailPage. Render loop moves to base-flare26.html behind an `is defined` guard so any page with the relation auto-renders.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1506 +/- ##
==========================================
+ Coverage 80.90% 81.22% +0.31%
==========================================
Files 147 147
Lines 10133 10160 +27
==========================================
+ Hits 8198 8252 +54
+ Misses 1935 1908 -27 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extend PencilBannerSnippet placement to HomePage, ArticleThemePage, and ArticleDetailPage.
Changes
*PencilBannerPlacementOrderable models for the three page types (Wagtail's ParentalKey can't target multiple page types, so one class per page).InlinePaneladded to each page'scontent_panels.free_form_page2026.htmlintobase-flare26.htmlbehind anis definedguard, matching the existing pattern used fordata-promoted-page. Any page exposingpencil_banner_placementsnow auto-renders.CreateModelops, purely additive.Test plan
python manage.py migratepytest springfield/cms/tests/test_pencil_banner_snippet.pyPencilBannerSnippetto HomePage, an ArticleThemePage (e.g./features/), and an ArticleDetailPage (e.g./features/protection/). Confirm banner renders at the top of each page and dismiss button works.